package cn.jingdalei.pet.service.impl;

import cn.jingdalei.basic.service.impl.BaseServiceImpl;
import cn.jingdalei.pet.domain.SearchMasterMsg;
import cn.jingdalei.pet.service.ISearchMasterMsgService;
import org.springframework.stereotype.Service;

@Service
public class SearchMasterMsgServiceImpl extends BaseServiceImpl<SearchMasterMsg> implements ISearchMasterMsgService {


    @Override
    public void publish(SearchMasterMsg searchMasterMsg, Long logininfoId) {
        // 1.获取当前的登录人

        // 2.寻主最近的店铺
        // 3.保存发布信息
    }


    //    private PetAcquisitionOrder pet2order(Pet pet, SearchMasterMsg adopt) {
//        PetAcquisitionOrder order = new PetAcquisitionOrder();
//        order.setDigest("[摘要]对"+pet.getName()+"收购订单！");
//        order.setState(0);//待支付
//        order.setPrice(pet.getCostprice());
//        order.setAddress(adopt.getAddress());
//        String orderSn = CodeGenerateUtils.generateOrderSn(adopt.getUser_id());
//        order.setOrderSn(orderSn);
//        order.setPet_id(pet.getId());
//        order.setUser_id(adopt.getUser_id());
//        order.setPaytype(0);
//        order.setShop_id(pet.getShop_id());
//        order.setEmp_id(EmployeeContext.getLoginEployee().getId());
//        return order;
//    }
}
